// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import iView from 'iview';
import 'iview/dist/styles/iview.css';

import axios from 'axios';
Vue.prototype.$axios = axios;

Vue.config.productionTip = false;
Vue.use(iView);

//全局变量
import api from './api';

Vue.prototype.$api = api;

/*echarts*/
import echarts from 'echarts'

Vue.prototype.$echarts = echarts;

/*router.beforeEach((to, from, next) => {
  const role = localStorage.getItem('ms_user');
  if(to.path == '/assess'){
    if(!role){
      next('/login');
    }else{
      next();
    }
  }else{
    next();
  }
});*/

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
});
